import request from '@/utils/request'

// 查询配置确认列表
export function qualityConfirmationList(lineId,pageNum,pageSize,startTime,endTime,mpn,lot) {
  return request({
    url: '/qcMoldSystem/list',
    method: 'get',
    params:{
      lineId:lineId,
      pageNum:pageNum,
      pageSize:pageSize,
      startTime:startTime,
      endTime:endTime,
      mpn:mpn,
      lot:lot
    }
  })
}



 
// 新增
export function addQualityConfirmation(data) {
  return request({
    url: '/qcMoldSystem/addQualityConfirmation',
    method: 'post',
    data:data
  })
}


//修改
export function updateQualityConfirmation(data) {
  return request({
    url: '/qcMoldSystem/updateQualityConfirmation',
    method: 'post',
    data:data
  })
}

//删除
export function deleteQualityConfirmation(qcId) {
  return request({
    url: '/qcMoldSystem/deleteQualityConfirmation',
    method: 'delete',
    params:{
      qcId:qcId
    }
  })
}

//确认
export function  confirmQualityConfirmation(qcId) {
  return request({
    url: '/qcMoldSystem/confirmQualityConfirmation',
    method: 'get',
    params:{
      qcId:qcId
    }
  })
}

//获取产线的机台号
export function getMachineNumber(lineId) {
  return request({
    url: '/qcMoldSystem/getMachineNumber',
    method: 'get',
    params:{
      lineId:lineId
    }
  })
}

//导出表
export function handleExport() {
  return request({
    url: '/qcMoldSystem/handleExport',
    method: 'post',
    responseType: 'blob',
  })
}

//查询最新一条是否完整


export function getNewMoldDataIfNull(lineId) {
  return request({
    url: '/qcMoldSystem/getNewMoldDataIfNull',
    method: 'get',
    params:{
      lineId:lineId
    }
  })
}

